import requests
from config import API_CONFIG


class IhrmLoginApi(object):
    #登陆方法
    @classmethod
    def login(cls,json_data):
        url = API_CONFIG["base_url"] + API_CONFIG["login_url"]
        header = API_CONFIG["headers"]
        resp=requests.post(url=url,headers=header,json=json_data)
        return resp

if __name__ == '__main__':
    from config import TEST_ACCOUNTS
    resp=IhrmLoginApi.login(TEST_ACCOUNTS["valid_user"])
    print(resp.json())